import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Main",
    component: () => import("@/views/Main.vue"),
    children: [
      {
        path: "/dashboard",
        name: "Dashboard",
        component: () => import("@/views/dashboard/Dashboard.vue"),
      },
      {
        path: "/nullobj",
        name: "nullobject",
        component: () => import("@/views/nullobject/index.vue"),
      },
      {
        path: "/dynamic",
        name: "dynamic",
        component: () => import("@/views/dynamic/index.vue"),
      },
      {
        path: "/workflow",
        name: "workflow",
        component: () => import("@/views/workflow/index.vue"),
      },
      {
        path: "/wfconfig",
        name: "wfconfig",
        component: () => import("@/views/wfconfig/index.vue"),
      },
      {
        path: "/pdfView",
        name: "pdfView",
        component: () => import("@/views/pdf/index.vue"),
      },
      {
        path: "/excelView",
        name: "excelView",
        component: () => import("@/views/excel/index.vue"),
        children: [
          {
            path: "index1",
            name: "index1",
            component: () => import("@/views/excel/components/index1.vue"),
          },
          {
            path: "index2",
            name: "index2",
            component: () => import("@/views/excel/components/index2.vue"),
          },
           {
            path: "index3",
            name: "index3",
            component: () => import("@/views/excel/components/index3.vue"),
          }
        ],
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/Login.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
